package com.seek.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by wangfeng on 16/7/13.
 */
@Controller
@RequestMapping("/service/notify")
public class ServiceNotifyController {
//    @Resource
//    private OrderNewService orderNewService;
//    @Resource
//    private CustomerService customerService;
//    @Resource
//    private InterService interService;
//    @Resource
//    private OrderDetailNewService orderDetailNewService;
//    @Resource
//    private MoneyLogNewService moneyLogNewService;
//
//    private Logger logger = LoggerFactory.getLogger(ServiceNotifyController.class);
//
//    @RequestMapping(value = "",produces = "text/html;charset=UTF-8")
//    @ResponseBody
//    public String index(HttpServletRequest request, HttpServletResponse response) throws Exception {
//        try {
//
//            String sign = request.getParameter("guess");
//            String time = request.getParameter("ts");
//            String reqJson = request.getParameter("json");
//
//            String before = reqJson + time + ApiUtil.SERVICE_SECRET;
//            logger.info("签名前:"+before);
//            String realSign = MD5Util.MD5(before).toLowerCase();
//            logger.info("计算签名:"+realSign+",传入签名:"+sign);
//            reqJson = URLDecoder.decode(reqJson,"utf-8");
//            logger.info("decode:"+reqJson);
//            if(!realSign.equals(sign)){
//                return "签名错误";
//            }
//
//            orderNewService.serviceNotify(reqJson);
//
//            return "success";
//        }catch(Exception e){
//            logger.error("业务输回调错误",e);
//            return e.getMessage();
//        }
//
//    }
}
